package com.bytz.modules.cms.product.entity;

import com.alibaba.excel.annotation.ExcelIgnoreUnannotated;
import com.alibaba.excel.annotation.ExcelProperty;
import com.baomidou.mybatisplus.annotation.TableLogic;
import com.baomidou.mybatisplus.annotation.TableName;
import com.bytz.common.aspect.annotation.Dict;
import com.bytz.common.entity.IEntity;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;

import java.io.Serializable;
import java.math.BigDecimal;
import java.time.LocalDateTime;

/**
 * <p>
 * 莱宝CMS—产品管理—产品基本信息表
 * </p>
 *
 * @author KyleWang
 * @since 2022-10-10
 */
@ExcelIgnoreUnannotated
@Data
@EqualsAndHashCode(callSuper = false)
@TableName("cms_product")
@ApiModel(value="Product对象", description="莱宝CMS—产品管理—产品基本信息表")
public class Product implements Serializable, IEntity {

    private static final long serialVersionUID = 1L;

    @ApiModelProperty(value = "主键")
    private String id;

    @ApiModelProperty(value = "商品编号")
    @ExcelProperty("商品编号")
    private String productNumber;

    @ApiModelProperty(value = "物料描述")
    private String materialDesc;

    @ApiModelProperty(value = "产品线ID")
    private String productLineId;

    @ApiModelProperty(value = "产品线编码：SV/IV")
    private String productLineCode;

    @ApiModelProperty(value = "产品线名称")
    private String productLineName;

    @ApiModelProperty(value = "优惠分类id")
    private String discountCategoryId;

    @ApiModelProperty(value = "优惠分类名字")
    private String discountCategoryName;

    @ApiModelProperty(value = "一级分类编号")
    private String hierarchyNumber;

    @ApiModelProperty(value = "产地")
    private String plant;

    @ApiModelProperty(value = "基准价")
    private BigDecimal basePrice;

    @ApiModelProperty(value = "成本价")
    @ExcelProperty("成本价")
    private BigDecimal costPrice;

    @ApiModelProperty(value = "替换商品编号")
    private String replaceProductNumber;

    @ApiModelProperty(value = "预计交期时间")
    @ExcelProperty("预计交期")
    private Integer deliveryDate;

    @ApiModelProperty(value = "最大订货数量")
    @ExcelProperty("最大订货数量")
    private Integer maxOrderQuantity;

    @ApiModelProperty(value = "状态（0：未上架，1：上架）")
    @Dict(dicCode = "product_status")
    @ExcelProperty("状态（0：未上架，1：上架）")
    private String status;

    @ApiModelProperty(value = "生效时间")
    private LocalDateTime effectTime;

    @ApiModelProperty(value = "备注")
    private String remark;

    @ApiModelProperty(value = "是否属于EC产品（0否；1是）")
    private String isEc;

    @ApiModelProperty(value = "删除状态")
    @TableLogic
    private Integer delFlag;

    @ApiModelProperty(value = "创建人")
    private String createBy;

    @ApiModelProperty(value = "创建人姓名")
    private String createByName;

    @ApiModelProperty(value = "创建时间")
    private LocalDateTime createTime;

    @ApiModelProperty(value = "更新人")
    private String updateBy;

    @ApiModelProperty(value = "更新人姓名")
    private String updateByName;

    @ApiModelProperty(value = "更新时间")
    private LocalDateTime updateTime;


}